//构造函数与数据成员默认值设置的实训
//Practical training on constructor and data member default Settings

// NOLINTBEGIN

#include <iostream>
using namespace std;
class Box  //
{
 public:
  Box(double = 1,
      double = 2,
      double= 3);  //构造默认值的设置，部分默认值就放在最右边 Constructs the default Settings, some of which are placed on the far right
  void display_Volume();

 private:
  double height;
  double width;
  double length;
};
Box::Box(double x, double y, double z)
    : height(x), width(y), length(z) {};  //构造函数的赋值列表 A list of constructor assignments
void Box::display_Volume() {
  cout << height * width * length << endl;
}

int main() {
  Box box[3] = {Box(10), Box(40, 50), Box(70, 80, 90)};  //类对象数组 Object-like array
  for (int i = 0; i < 3; i++) {
    box[i].display_Volume();
  }
  //system("pause");
  return 0;
}
// NOLINTEND